<h3>编辑资源</h3>
<% form_for @resource, :html => {:onsubmit => "copy_content_before_form_submit('editor', 'resource_description');"} do |f| %>
  <%= f.error_messages %>
<table>
    <tr>
        <td>
            <%= f.label :title, "标题" %>
        </td>
        <td>
            <%= f.text_field :title %>
        </td>
    </tr>
	<tr>
		<td>标签</td>
		<td><%= f.text_field :tag_list, :size => 40 %> (请用半角逗号分隔)</td>
	</tr>
	<tr>
		<td>资源URL</td>
		<td><%= f.text_field :url, :size => 40 %></td>
	</tr>
    <tr>
        <td>
            <%= f.label :description, "资源描述" %>
        </td>
        <td>
			<%= f.text_area :description, :style => "display: none" %>
			<iframe id="editor" name="editor" src="/editor.html?ubb=0&id=resource_description" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" style="height:400px;width:700px"></iframe>
        </td>
    </tr>
    <tr>
        <td>
            <%= image_submit_tag("/images/update_resource.png") %>
        </td>
    </tr>
</table>
<% end %>